Qid Examcode Question Qimpath opt1 opt2 opt3 opt4 opt5 opt6 opt7 opt8 opt9 opt10 opt11 opt12 opt13 opt14 opt15 impath1 impath2 impath3 impath4 impath5 impath6 impath7 impath8 impath9 impath10 impath11 impath12 impath13 impath14 impath15 answers uanswer CR Edit Delete
109 1Z0-809 Given the code fragment: 109.que9java.png All files and directories under the home directory are listed along with their attributes. A compilation error occurs at line n1. The files in the home directory are listed along with their attributes. A compilation error occurs at line n2. 3 SC edit delete
108 1Z0-809 Given the code fragment: 108.que9java.png List fc = Files.list(file); fc.stream().forEach (s -> System.out.println(s)); Stream fc = Files.readAllLines (file); fc.forEach (s - > System.out.println(s)); List fc = Files.readAllLines(file); fc.stream().forEach (s -> System.out.println(s)); Stream fc = Files.list (file); fc.forEach (s -> System.out.println(s)); 3 SC edit delete
107 1Z0-809 Given the definition of the Emp class: 107.que9java.png Sam John Jim John Jim A compilation error occurs at line n1. A compilation error occurs at line n2. 3 SC edit delete
106 1Z0-809 Given the code fragment: 106.que9java.png Searching… Searching… Searching… Searching… Searching… Searching… A compilation error occurs. 3 SC edit delete
105 1Z0-809 Given the code fragment: 105.que9java.png Hello : Jim Hello : John Hello : Jeff Jim John Jeff The program prints nothing. A compilation error occurs. 3 SC edit delete
104 1Z0-809 Given the code fragment: 104.que9java.png /app/sys/log /readme/server/exe /app/log/sys /server/exe/readme /app/./sys/log /readme /app/./sys/log /server/exe/readme 4 SC edit delete
103 1Z0-809 Given the code fragment: 103.que9java.png 4000.0 4000 A compilation error occurs at line n1. A compilation error occurs at line n2. 4 SC edit delete
102 1Z0-809 Given that these files exist and are accessible: 102.que9java.png 1 2 3 An Exception is thrown at runtime. 4 SC edit delete
101 1Z0-809 Given: 101.que9java.png start the threads t1 and t2 within a synchronized block. Replace line n1 with: private synchronized int count = 0; Replace line n2 with: public synchronized void run () { Replace line n2 with: volatile int count = 0; 1 SC edit delete
100 1Z0-809 Given: 100.que9java.png Line 3: public synchronized void run() { Line 1: class MyClass extends Thread { Line 2: public volatile int value; Line 2: public synchronized int value; 2 SC edit delete
99 1Z0-809 Given: 99.que9java.png A compilation error occurs. Java EE Java ME [Java EE: Helen:Houston] [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] [Java EE: Helen:Houston] 2 SC edit delete
98 1Z0-809 Given: 98.que9java.png 4:60 2:30 4:60 2:30 3:20 1:10 4:0 The program prints nothing 3 SC edit delete
97 1Z0-809 Given the code fragment: 97.que9java.png A compilation error occurs at line n2. 200.12 300.32 100.12 200.32 A compilation error occurs at line n1. 1 SC edit delete
96 1Z0-809 Given the code fragments: 96.que9java.png Future f1 = (Future) es.submit (r1); es.execute (c1); es.execute (r1); Future f1 = es.execute (c1) ; Future f1 = (Future) es.execute(r1); Future f2 = (Future) es.execute(c1); es.submit(r1); Future f1 = es.submit (c1); 4 SC edit delete
95 1Z0-809 Which two statements are true about synchronization and locks? (Choose two.) A thread automatically acquires the intrinsic lock on a synchronized statement when executed. The intrinsic lock will be retained by a thread if return from a synchronized method is caused by an uncaught exception. A thread exclusively owns the intrinsic lock of an object between the time it acquires the lock and the time it releases it. A thread automatically acquires the intrinsic lock on a synchronized method’s object when entering that method. Threads cannot acquire intrinsic locks on classes. 1,2 MC edit delete
94 1Z0-809 Which two statements are true about the Fork/Join Framework? (Choose two.) The RecursiveTask subclass is used when a task does not need to return a result. The Fork/Join framework can help you take advantage of multicore hardware. The Fork/Join framework implements a work-stealing algorithm. The Fork/Join solution when run on multicore hardware always performs faster than standard sequential solution. 1,3 MC edit delete
93 1Z0-809 Given the code fragment: 93.que9java.png Function funRef = e –> e + 10; Integer result = funRef.apply(value); IntFunction funRef = e –> e + 10; Integer result = funRef.apply (10); ToIntFunction funRef = e –> e + 10; int result = funRef.applyAsInt (value); ToIntFunction funRef = e –> e + 10; int result = funRef.apply (value); 1 SC edit delete
92 1Z0-809 Given the records from the STUDENT table: 92.que9java.png The STUDENT table is not updated and the program prints: 114 : John : john@uni.com The STUDENT table is updated with the record: 113 : Jannet : jannet@uni.com and the program prints: 114 : John : john@uni.com The STUDENT table is updated with the record: 113 : Jannet : jannet@uni.com and the program prints: 113 : Jannet : jannet@uni.com A SQLException is thrown at run time. 4 SC edit delete
91 1Z0-809 Given the code fragments: 91.que9java.png null A compilation error occurs. DogCatMouse [Dog, Cat, Mouse] 4 SC edit delete
90 1Z0-809 Given the Greetings.properties file, containing: 90.que9java.png Compilation fails. GOODBY_MSG Hello, everyone! Goodbye everyone! HELLO_MSG 1 SC edit delete
89 1Z0-809 Given the code fragment: 89.que9java.png Properties prop = new Properties(); prop.put (“user”, userName); prop.put (“password”, password); con = DriverManager.getConnection (dbURL, prop); con = DriverManager.getConnection (userName, password, dbURL); Properties prop = new Properties(); prop.put (“userid”, userName); prop.put (“password”, password); prop.put(“url”, dbURL); con = DriverManager.getConnection (prop); con = DriverManager.getConnection (dbURL); con.setClientInfo (“user”, userName); con.setClientInfo (“password”, password); 1 SC edit delete
88 1Z0-809 Given: 88.que9java.png 0.0 1500.0 A compilation error occurs. 2000.0 2 SC edit delete
87 1Z0-809 Given the code fragments: 87.que9java.png Replace line n1 with class Person extends Comparator At line n2 insert public int compareTo (Person p) { return this.name.compareTo (p.name); } Replace line n1 with class Person implements Comparable At line n2 insert public int compare (Person p1, Person p2) { return p1.name.compareTo (p2.name); } At line n2 insert: public int compareTo (Person p, Person p2) { return p1.name.compareTo (p2.name); } Replace line n1 with class Person implements Comparator 2,3 MC edit delete
86 1Z0-809 Given the code fragment: 86.que9java.png .anyMatch (); .allMatch (); .findAny (); .noneMatch (); .findFirst (); 3,5 MC edit delete
85 1Z0-809 Given: 85.que9java.png A B C D 85.Aans9java.png 85.Bans9java.png 85.Cans9java.png 85.Dans9java.png 3 SC edit delete
84 1Z0-809 Given: 84.que9java.png Hi Interface-2 A compilation error occurs. Hi Interface-1 Hi MyClass 4 SC edit delete
83 1Z0-809 Given the code fragment: 83.que9java.png Word: why what when Word: why Word: why what Word: why what when Word: why Word: what Word: when Compilation fails at line n1. 1 SC edit delete
82 1Z0-809 Given the code fragments : 82.que9java.png TV Price :110 Refrigerator Price :2100 A compilation error occurs. TV Price :1000 Refrigerator Price :2000 The program prints nothing. 1 SC edit delete
81 1Z0-809 Given the code fragment: 81.que9java.png Java EEJava EESE Java EESE The program prints either: Java EEJava SE or Java SEJava EE Java EEJava SE 4 SC edit delete
80 1Z0-809 Given the code fragment: 80.que9java.png BiConsumer c = (i, j) -> {System.out.print (i + “,” + j+ “; “);}; BiFunction c = (i, j) –> {System.out.print (i + “,” + j+ “; “)}; BiConsumer c = (i, j) –> {System.out.print (i + “,” + j+ “; “)}; BiConsumer c = (i, j) –> {System.out.print (i + “,” + j+ “; “);}; 2 SC edit delete
79 1Z0-809 Given: 79.que9java.png Option A Option B Option C Option D 2 SC edit delete
78 1Z0-809 Given the definition of the Book class: 78.que9java.png It demonstrates encapsulation. It is defined using the factory design pattern. It is defined using the singleton design pattern. It demonstrates polymorphism. It is an immutable class. 1 SC edit delete
77 1Z0-809 Given the code fragment: 77.que9java.png Replace line n2 with .map (n -> System.out.println (“New Price” + n –1)) and remove line n3 Replace line n2 with .mapToInt (n -> n – 1); Replace line n1 with .forEach (e -> System.out.print (“Price” + e)) Replace line n3 with .forEach (n -> System.out.println (“New Price” + n)); 4 SC edit delete
76 1Z0-809 Given: 76.que9java.png Foo mark = new Foo (“Steve”, 100); Foo pair = Foo.twice (“Hello World!”); Foo percentage = new Foo(“Steve”, 100); Foo grade = new Foo <> (“John”, “A”); 1 SC edit delete
75 1Z0-809 Which code fragment is required to load a JDBC 3.0 driver? Connection con = Connection.getDriver (“jdbc:xyzdata://localhost:3306/EmployeeDB”); Class.forName(“org.xyzdata.jdbc.NetworkDriver”); Connection con = DriverManager.getConnection (“jdbc:xyzdata://localhost:3306/EmployeeDB”); DriverManager.loadDriver (“org.xyzdata.jdbc.NetworkDriver”); 2 SC edit delete
74 1Z0-809 Which two methods from the java.util.stream.Stream interface perform a reduction operation? (Choose two.) count () collect () distinct () peek () filter () 1,2 MC edit delete
73 1Z0-809 Given: 73.que9java.png An exception is thrown at line n2. 100 A compilation error occurs because the try block is declared without a catch or finally block. A compilation error occurs at line n1. 2 SC edit delete
72 1Z0-809 Assume customers.txt is accessible and contains multiple lines. Which code fragment prints the contents of the customers.txt file? Stream stream = Files.find (Paths.get (“customers.txt”)); stream.forEach((String c) -> System.out.println(c)); Stream stream = Files.find (Paths.get (“customers.txt”)); stream.forEach( c) -> System.out.println(c)); Stream stream = Files.list (Paths.get (“customers.txt”)); stream.forEach( c) -> System.out.println(c)); Stream lines = Files.lines (Paths.get (“customers.txt”)); lines.forEach( c) -> System.out.println(c)); 4 SC edit delete
71 1Z0-809 Given the code fragment: 71.que9java.png A compilation error occurs at line n1. Checking… Checking… Checking… A compilation error occurs at line n2. 1 SC edit delete
70 1Z0-809 Given the code fragment: 70.que9java.png A compilation error occurs at line n1. Logged out at: 2015-01-12T21:58:19.880Z Can’t logout Logged out at: 2015-01-12T21:58:00Z 4 SC edit delete
69 1Z0-809 Given the code fragment: 69.que9java.png A compilation error occurs at line n2. 3 2 A compilation error occurs at line n1. 1 SC edit delete
68 1Z0-809 Given the code fragment: 68.que9java.png Compilation fails at line 14. Compilation fails at line 15. The code prints the employee ID. The code prints Error. 1 SC edit delete
67 1Z0-809 Given the code fragment: 67.que9java.png Path iP = new Paths (“/First.txt”); Path iP = Paths.toPath (“/First.txt”); Path iP = new Path (“/First.txt”); Path iP = Paths.get (“/”, “First.txt”); 4 SC edit delete
66 1Z0-809 Given the code fragments: 66.que9java.png France Optional[NotFound] Optional [France] Optional [NotFound] Optional[France] Not Found France Not Found 4 SC edit delete
65 1Z0-809 Given the code fragment: 65.que9java.png Val:20 Val:40 Val:60 Val:10 Val:20 Val:30 A compilation error occurs. Val: Val: Val: 1 SC edit delete
64 1Z0-809 Given: 64.que9java.png assert (fuelLevel) : “Terminating…”; assert (fuelLevel > 0) : System.out.println (“Impossible fuel”); assert fuelLevel < 0: System.exit(0); assert fuelLevel > 0: “Impossible fuel” ; 3 SC edit delete
63 1Z0-809 Given the code fragment: 63.que9java.png A compilation error occurs at line n1. courseJava Javacourse A compilation error occurs at line n2. 1 SC edit delete
62 1Z0-809 Given the code fragment: 62.que9java.png boolean b = cs.stream() .findAny() .get() .equals(“Java”); boolean b = cs.stream() .anyMatch (w -> w.equals (“Java”)); boolean b = cs.stream() .findFirst() .get() .equals(“Java”); boolean b = cs.stream() .allMatch(w -> w.equals(“Java”)); 2 SC edit delete
61 1Z0-809 Given: 61.que9java.png Open-Close– Exception – 1 Open–Close– Open–Close–Open–Close– A compilation error occurs at line n1. Open–Close–Open– 3 SC edit delete
60 1Z0-809 Given the code fragment: 60.que9java.png A B C D 60.Aans9java.png 60.Bans9java.png 60.Cans9java.png 60.Dans9java.png 4 SC edit delete
59 1Z0-809 In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM. 59.que9java.png 3:00 – difference: 2 2:00 – difference: 1 4:00 – difference: 3 4:00 – difference: 2 4 SC edit delete
58 1Z0-809 Given the code fragment: 58.que9java.png A ClassNotFoundException is thrown at runtime. The program prints nothing. The program prints Connection Established. A SQLException is thrown at runtime. 3 SC edit delete
57 1Z0-809 Given: 57.que9java.png A compilation error occurs at line n2. A compilation error occurs because the try block doesn’t have a catch or finally block. A compilation error occurs at line n1. The program compiles successfully. 2 SC edit delete
56 1Z0-809 Given: 56.que9java.png true true false true false false true false 4 SC edit delete
55 1Z0-809 Given the code fragment: 55.que9java.png A compilation error occurs. [Java, J2EE, J2ME, JSTL, JSP] null [Java, J2EE, J2ME, JSTL] 4 SC edit delete
54 1Z0-809 Given: 54.que9java.png IT:null A NullPointerException is thrown at run time. A compilation error occurs. IT:0.0 4 SC edit delete
53 1Z0-809 Given the content of the employee.txt file: 53.que9java.png Exception 1 Exception 2 The program executes, does NOT affect the system, and produces NO output.b allemp.txt is created and the content of employee.txt is copied to it. 1 SC edit delete
52 1Z0-809 Given: 52.que9java.png Bar Hello Foo Hello Bar Hello Baz Hello Baz Hello A compilation error occurs in the Daze class. 2 SC edit delete
51 1Z0-809 Given that /green.txt and /colors/yellow.txt are accessible, and the code fragment: 51.que9java.png The green.txt file content is replaced by the yellow.txt file content and the yellow.txt file is deleted. The yellow.txt file content is replaced by the green.txt file content and an exception is thrown. The file green.txt is moved to the /colors directory. A FileAlreadyExistsException is thrown at runtime. 4 SC edit delete
50 1Z0-809 Given the code fragments: 50.que9java.png stre.forEach(System.out::print); stre.map(a-> a.techName).forEach(System.out::print); stre.map(a-> a).forEachOrdered(System.out::print); stre.forEachOrdered(System.out::print); 2 SC edit delete
49 1Z0-809 Given: 49.que9java.png Arrays.sort(strArray, CheckClass : : checkValue); Arrays.sort(strArray, (CheckClass : : new) : : checkValue); Arrays.sort(strArray, (CheckClass : : new).checkValue); Arrays.sort(strArray, CheckClass : : new : : checkValue); 1 SC edit delete
48 1Z0-809 Given the code fragment: 48.que9java.png The program throws a runtime exception at line n2. The program prints files names concurrently. The program prints files names sequentially. A compilation error occurs at line n1. 2 SC edit delete
47 1Z0-809 Given the code fragment: 47.que9java.png The program prints Call Call and terminates. The program prints Call Call and does not terminate. A compilation error occurs at line n1. An ExecutionException is thrown at run time. 2 SC edit delete
46 1Z0-809 Given: 46.que9java.png Rate of interest: 0 An AssertionError is thrown. No interest for this account A compilation error occurs at line n1. 2 SC edit delete
45 1Z0-809 Given the records from the Employee table: 45.que9java.png The Employee table is updated with the row: 112 Jack and the program prints: 112 Jerry The Employee table is updated with the row: 112 Jack and the program prints: 112 Jack The Employee table is not updated and the program prints: 112 Jerry The program prints Exception is raised. 3 SC edit delete
44 1Z0-809 You have been asked to create a ResourceBundle which uses a properties file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu? File Menu View Menu menu1File Menu menu2View Menu menu1, File Menu, menu2, View Menu Menu menu1 = File Menu menu2 = View Menu 4 SC edit delete
43 1Z0-809 Given the code fragment: 43.que9java.png 4000.0 4000 A compilation error occurs at line n1. A compilation error occurs at line n2. 4 SC edit delete
42 1Z0-809 Which statement is true about java.time.Duration? It tracks time zones. It preserves daylight saving time. It defines time-based values. It defines date-based values. 3 SC edit delete
41 1Z0-809 Given the code fragment: 41.que9java.png 20 20.5 A compilation error occurs at line n1. A compilation error occurs at line n2. 3 SC edit delete
40 1Z0-809 Given the code fragment: 40.que9java.png 2016-02-14 A DateTimeException is thrown. 2016-02-29 A compilation error occurs at line n1. 1 SC edit delete
39 1Z0-809 For which three objects must a vendor provide implementations in its JDBC driver? (Choose three.) Time Date Statement ResultSet Connection SQLException DriverManager 3,4,5 MC edit delete
38 1Z0-809 Given the definition of the Emp class: 38.que9java.png Sam John Jim John Jim A compilation error occurs at line n1. A compilation error occurs at line n2. 2 SC edit delete
37 1Z0-809 Given: 37.que9java.png Replace line n1 with public void ride() throws FuelNotAvailException { Replace line n1 with protected void ride() throws Exception { Replace line n2 with void ride() throws Exception { Replace line n2 with private void ride() throws FuelNotAvailException { 2 SC edit delete
36 1Z0-809 You want to create a singleton class by using the Singleton design pattern. Which two statements enforce the singleton nature of the design? (Choose two.) Make the class static. Make the constructor private. Override equals() and hashCode() methods of the java.lang.Object class. Use a public reference to point to the single instance. Implement the Serializable interface. Make the single instance created static and final. 2, 6 MC edit delete
35 1Z0-809 Given: 35.que9java.png Replace line n1 with: class Folder implements AutoCloseable { Replace line n1 with: class Folder extends Closeable { Replace line n1 with: class Folder extends Exception { At line n2, insert: final void close () { System.out.print(“Close”); } At line n2, insert: public void close () throws IOException { System.out.print(“Close”); } 1, 5 MC edit delete
34 1Z0-809 The data.doc, data.txt and data.xml files are accessible and contain text. 34.que9java.png The program prints the content of data.txt file. The program prints: Exception <> <> A compilation error occurs at line n1. The program prints the content of the three files. 1 SC edit delete
33 1Z0-809 Which statement is true about java.util.stream.Stream? A stream cannot be consumed more than once. The execution mode of streams can be changed during processing. Streams are intended to modify the source data. A parallel stream is always faster than an equivalent sequential stream. 2 SC edit delete
32 1Z0-809 Which two statements are true about localizing an application? (Choose two.) Support for new regional languages does not require recompilation of the code. Textual elements (messages and GUI labels) are hard-coded in the code. Language and region-specific programs are created using localized data. Resource bundle files include data and currency information. Language codes use lowercase letters and region codes use uppercase letters. 1,5 MC edit delete
31 1Z0-809 Given: 31.que9java.png A compilation error occurs in IceCream. A compilation error occurs in Cake. A compilation error occurs in Shop. A compilation error occurs in Bread All classes compile successfully. 4 SC edit delete
30 1Z0-809 Given the code fragment: 30.que9java.png nums.stream().max(Comparator.comparing(a -> a)).get() nums.stream().max(Integer : : max).get() nums.stream().max() nums.stream().map(a -> a).max() 1 SC edit delete
29 1Z0-809 Which statement is true about the DriverManager class? It returns an instance of Connection. it executes SQL statements against the database. It only queries metadata of the database. it is written by different vendors for their specific database. 1 SC edit delete
28 1Z0-809 Which statement is true about the single abstract method of the java.util.function.Function interface? It accepts one argument and returns void. It accepts one argument and returns boolean. It accepts one argument and always produces a result of the same type as the argument. It accepts an argument and produces a result of any data type. 4 SC edit delete
27 1Z0-809 Given: 27.que9java.png Car auto = Car (“MyCar”): : new; Car auto = Car : : new; Car vehicle = auto : : getCar(“MyCar”); Rideable rider = Car : : new; Car vehicle = rider.getCar(“MyCar”); Car vehicle = Rideable : : new : : getCar(“MyCar”); 3 SC edit delete
26 1Z0-809 Given the code fragment: 26.que9java.png 100, Robin, HR 101, Peter, HR A compilation error occurs at line n1. 100, Robin, HR 101, Peter, HR 200, Mary, AdminServices 100, Robin, HR 200, Mary, AdminServices 101, Peter, HR 1 SC edit delete
25 1Z0-809 Given the code fragment: 25.que9java.png 0 : 0 : pen 0 : 1 : pen 0 : 0 : 0 : 0 : 0 : pen 0 : 1 : 2 : 3 : 4 : A compilation error occurs. 1 SC edit delete
24 1Z0-809 Given: 24.que9java.png Board does not compile. Paper does not compile. Frame does not compile. Drawable does not compile. All classes compile successfully. 5 SC edit delete
23 1Z0-809 Given the code fragments: 23.que9java.png The program prints: Run Runner Call Caller : null And the program does not terminate. The program terminates after printing: Run Runner Call Caller : Run A compilation error occurs at line n1. An Execution is thrown at run time. 1 SC edit delete
22 1Z0-809 Given the code fragment: 22.que9java.png listVal.stream().filter(x -> x.length()>3).count() listVal.stream().map(x -> x.length()>3).count() listVal.stream().peek(x -> x.length()>3).count().get() listVal.stream().filter(x -> x.length()>3).mapToInt(x -> x).count() 1 SC edit delete
21 1Z0-809 Given the code fragments: 21.que9java.png [A Guide to Java Tour:3.0, Beginning with Java:2.0] [Beginning with Java:2.0, A Guide to Java Tour:3.0] A compilation error occurs because the Book class does not override the abstract method compareTo(). An Exception is thrown at run time. 4 SC edit delete
20 1Z0-809 Given: 20.que9java.png 2 : 30 4 : 0 4 : 60 4 : 60 2 : 30 3 : 20 1 : 10 The program prints nothing. 3 SC edit delete
19 1Z0-809 Given the definition of the Vehicle class: 19.que9java.png Make the Vehicle class public. Make the name variable public. Make the getName method public. Make the name variable private. Make the setName method private. Make the getName method private. 4 SC edit delete
18 1Z0-809 Given: 18.que9java.png Java 100 java.lang.string@java.lang.Integer@ A compilation error occurs. To rectify it, replace line n1 with: Test type1 = new Test<>(); A compilation error occurs. To rectify it, replace line n2 with: type1.set (Integer(100)); 1 SC edit delete
17 1Z0-809 Given that course.txt is accessible and contains: 17.que9java.png ur :: va ueJa The program prints nothing. A compilation error occurs at line n1. 2 SC edit delete
16 1Z0-809 Given: 16.que9java.png 10123 Ford 10124 BMW 10124 BMW 10123 Ford A compilation error occurs. A ClassCastException is thrown at run time. 4 SC edit delete
15 1Z0-809 Given the code fragment: 15.que9java.png All files and directories under the home directory are listed along with their attributes. A compilation error occurs at line n1. The files in the home directory are listed along with their attributes. A compilation error occurs at line n2. 1 SC edit delete
14 1Z0-809 Given the code fragments: 14.que9java.png New York City Not available null A NoSuchElementException is thrown at run time. 2 SC edit delete
13 1Z0-809 Given the structure of the STUDENT table: 13.que9java.png The program executes successfully and the STUDENT table is updated with one record. The program executes successfully and the STUDENT table is NOT updated with any record. A SQLException is thrown as runtime. A NullPointerException is thrown as runtime. 3 SC edit delete
12 1Z0-809 Given: 12.que9java.png Scan.Printer closed. Scanner closed. Unable to scan. Scan.Scanner closed. Printer closed.Unable to scan. Scan. Unable to scan. Scan. Unable to scan. Scanner closed. 1 SC edit delete
11 1Z0-809 Given the code fragment: 11.que9java.png int GDP = Integer.parseInt (br.readline()); int GDP = br.read(); int GDP = br.nextInt(); int GDP = Integer.parseInt (br.next()); 1 SC edit delete
10 1Z0-809 Given the code fragment: 10.que9java.png The program prints 1 2 3 and the order is unpredictable. The program prints 1 2 3. The program prints 1 1 1. A compilation error occurs. 1 SC edit delete
9 1Z0-809 Given the code fragment: 09.que9java.png An exception is thrown at run time. 2:MyPic.jpeg: MyPic.jpeg 3:.:MyPic.jpeg 2:Pics: MyPic.jpeg 2 SC edit delete
8 1Z0-809 Which action can be used to load a database driver by using JDBC3.0? Add the driver class to the META-INF/services folder of the JAR file. Include the JDBC driver class in a jdbc.properties file. Use the java.lang.Class.forName method to load the driver class. Use the DriverManager.getDriver method to load the driver class. 3 SC edit delete
7 1Z0-809 Given the content of /resourses/Message.properties: 07.que9java.png Good day! Test followed by an Exception stack trace Good day! followed by an Exception stack trace Good day! Test null A compilation error occurs at line n1. 3 SC edit delete
6 1Z0-809 Given: 06.que9java.png The program prints true. The program prints false. A compilation error occurs. To ensure successful compilation, replace line n1 with: boolean equals (Book obj) { A compilation error occurs. To ensure successful compilation, replace line n2 with: System.out.println (b1.equals((Object) b2)); 1 SC edit delete
5 1Z0-809 Given the code fragment: 05.que9java.png {1007 = A, 1002 = C, 1001 = B, 1003 = B} {1001 = B, 1002 = C, 1003 = B, 1007 = A} {1002 = C, 1003 = B, 1007 = A} {1007 = A, 1001 = B, 1003 = B, 1002 = C} 2 SC edit delete
4 1Z0-809 Given the definition of the Country class: 04.que9java.png {EUROPE = [Italy, Germany], ASIA = [Japan]} {ASIA = [Japan], EUROPE = [Italy, Germany]} {EUROPE = [Germany, Italy], ASIA = [Japan]} {EUROPE = [Germany], EUROPE = [Italy], ASIA = [Japan]} 2 SC edit delete
3 1Z0-809 Given the code fragments: 03.que9java.png Comment the lines 28, 29 and 30. Replace line 26 with: } catch (Exception | ArithmeticException | NumberFormatException e) { Replace line 26 with: } catch (ArithmeticException | NumberFormatException e) { Replace line 27 with: throw e; 3 SC edit delete
2 1Z0-809 Given the code fragment: 02.que9java.png The method deletes all the .class files in the Projects directory and its subdirectories. The method deletes the .class files of the Projects directory only. The method executes and does not make any changes to the Projects directory. The method throws an IOException. 1 SC edit delete
1 1Z0-809 Given the code fragment: 01.que9java.png List fc = Files.list(file); fc.stream().forEach (s - > System.out.println(s)); Stream fc = Files.readAllLines (file); fc.forEach (s - > System.out.println(s)); List fc = readAllLines(file); fc.stream().forEach (s - > System.out.println(s)); Stream fc = Files.lines (file); fc.forEach (s - > System.out.println(s)); 4 SC edit delete